Skip to main content

SetLocale

Sets a locale to the document.

Syntax

expression.SetLocale(LCID);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
LCIDRequirednumberThe locale specified.

Returns

This method doesn't return any data.

Example

This example sets a locale to the document.

var oWorksheet = Api.GetActiveSheet();
Api.SetLocale("en-CA");
oWorksheet.GetRange("A1").SetValue("A sample spreadsheet with the language set to English (Canada).");